package com.jy.admin.db.dao.impl;
import com.fqgj.common.api.Page;
import com.fqgj.common.base.AbstractBaseMapper;
import com.jy.admin.db.dao.OpdUploadRecordDao;
import com.jy.admin.db.entity.OpdUploadRecordEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* User: anonymous
* Date: 2021-11-26
* Time: 19:35:10.889
*/

@Repository
public class OpdUploadRecordDaoImpl extends AbstractBaseMapper<OpdUploadRecordEntity> implements OpdUploadRecordDao {

    @Override
    public List<OpdUploadRecordEntity> getListByMerchantCode(String merchantCode) {
        Map<String,String> params = new HashMap<>();
        params.put("merchantCode",merchantCode);
        return getSqlSession().selectList(this.getStatement("getListByMerchantCode"), params);
    }

    @Override
    public OpdUploadRecordEntity getByDataNo(String dataNo) {
        Map<String,String> params = new HashMap<>();
        params.put("dataNo",dataNo);
        return getSqlSession().selectOne(this.getStatement("getByDataNo"), params);
    }

    @Override
    public List<OpdUploadRecordEntity> getListByStatus(Integer status, Page page) {
        Map<String,Object> params = new HashMap<>();
        params.put("status",status);
        params.put("page",page);
        return getSqlSession().selectList(this.getStatement("getListByStatus"), params);
    }

    @Override
    public List<OpdUploadRecordEntity> getDndCheckedListByStatus(Integer status,Integer dndChecked, Page page) {
        Map<String,Object> params = new HashMap<>();
        params.put("status",status);
        params.put("page",page);
        params.put("dndChecked",dndChecked);
        return getSqlSession().selectList(this.getStatement("getDndCheckedListByStatus"), params);
    }
}